<?php
class picture_topic_row extends system_concept_row {
	
	protected $_cover = null;
	/**
	 * @return resource_display
	 */
	public function getCover() {
		if($this->_cover === null || ($this->_cover->getHash() && $this->_cover->getHash() != $this->get('cover'))) {
			$this->_cover = new resource_display($this->get('cover'));
		}
		return $this->_cover;
	}
	
	public function setName($name) {
		if(!$name) {
			$this->set('name', '');
		} else {
			$name = preg_replace('#[\\\\\\\/\?\|\#]+#u', '-', $name);
			$this->set('name', $name);
		}
		return $this;
	}
	
}
